home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cserial.zip / TKB.C < prev    next >
C/C++ Source or Header  |  1990-04-04  |  416b  |  26 lines

  1. /*
  2.  *                                TKB.C
  3.  *
  4.  *                  Keyboard input test driver program
  5.  */
  6.  
  7. #include <stdio.h>
  8. #include "_kb.h"
  9.  
  10. #if (!defined (TRUE))
  11. #    define TRUE  (1)
  12. #    define FALSE (0)
  13. #endif
  14.  
  15. main ()
  16. {
  17.     int     i;
  18.     while (TRUE)
  19.     {
  20.         while ((i = _kb ()) == -1);
  21.         if (i == 'q')
  22.             break;
  23.         printf ("_KB () = (%d) [%c]\n", i, i);
  24.     }
  25. }
  26.